package com.ujs.educms.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ujs.commonutils.constant.R;
import com.ujs.educms.entity.CrmBanner;
import com.ujs.educms.service.CrmBannerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 首页banner表 前端控制器
 * </p>
 *
 * @author testjava
 * @since 2023-08-10
 */
@RestController
@RequestMapping("/educms/bannerfront")
@Api(tags = "前台banner管理")
public class BannerFrontController {
    @Autowired
    private CrmBannerService bannerService;

    @GetMapping("/getAllBanner")
    @ApiOperation("查询所有的banner")
    public R getAllBanner() {
        List<CrmBanner> list = bannerService.selectAllBanner();
        return R.ok().data("list", list);
    }
}

